home *** CD-ROM | disk | FTP | other *** search
- on mouseDown
- global gSysVol
- set r to the regPoint of cast "SLIDER.PIC"
- delete char 1 to 9 of r
- delete char the number of chars in r of r
- set r to value(r)
- set min to 133 + r
- set max to 213 + r
- set range to max - min
- set c to 1
- repeat while the mouseDown
- set newV to the mouseV + r
- if newV > max then
- set newV to max
- else
- if newV < min then
- set newV to min
- end if
- end if
- set thePercent to float(newV - min) / float(range)
- set gSysVol to integer((1 - thePercent) * 255.0)
- updateVolume()
- end repeat
- end
-